/*
 * Group 3, User Interface Programming II (vt11)
 * Pooya | Flora | Monica | Can
 */
package vical.view;

import javax.swing.AbstractAction;
import vical.action.DeleteEntryAction;
import vical.action.EditEntryAction;
import vical.model.Entry;

/**
 * The entry Dialog to edit an Entry
 * @author Can
 */
public class EditEntryDialog extends EntryDialog {

    private Entry oldEntry;

    public EditEntryDialog(Entry oldEntry) {
        super(oldEntry);
        this.oldEntry = oldEntry.clone();
    }

    public Entry getOldEntry() {
        return oldEntry;
    }

    @Override
    protected AbstractAction getDoneButtonAction() {
        return new EditEntryAction(this);
    }

    @Override
    protected AbstractAction getRemoveButtonAction() {
        return new DeleteEntryAction(this);
    }
}
